package prototype;

import java.util.Date;

public class CloneOne {

    public static void main(String[] args) throws CloneNotSupportedException {
        Date date = new Date();
        Product product = new Product("张三", date);
        Product porductClone = (Product) product.clone();
        System.out.println("修改前"+product.toString());
        System.out.println("修改前"+porductClone.toString());


        date.setTime(123453245);
        System.out.println("修改后"+product.toString());
        System.out.println("修改后"+porductClone.toString());

    }
}
